﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DesignPattern.FactoryPattern
{
    public class Operation
    {
        protected double numA = 0;
        protected double numB = 0;
    
        public double NumA
        {
            get { return numA; }
            set { numA = value; }
        }
        public double NumB
        {
            get { return numB; }
            set { numB = value; }
        }
    
        public virtual double GetResult()
        {
            double result = 0;
            return result;
        }
    }

    public class OperationAdd : Operation
    {
        public override double GetResult()
        {
            double result = numA + numB;
            return result;
        }
    }

    public class OperationSub : Operation
    {
        public override double GetResult()
        {
            double result = numA - numB;
            return result;
        }
    }

    public class OperationMul : Operation
    {
        public override double GetResult()
        {
            double result = numA * numB;
            return result;
        }
    }

    public class OperationDiv : Operation
    {
        public override double GetResult()
        {
            double result = numA / numB;
            return result;
        }
    }
}
